package com.bw.merchant.api

import com.bw.common.api.BaseApiServer
import com.bw.common.entity.BaseRes
import com.bw.merchant.entity.AddApplicationEntity
import com.bw.merchant.entity.ApprovalDetailEntity
import com.bw.merchant.entity.DetailMerchantEntity
import com.bw.merchant.entity.MerchantListEntityItem
import com.bw.merchant.entity.RecordingEntityItem
import com.bw.merchant.page.MerchantDetailActivity
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface MerchantApiServer:BaseApiServer {
    //商家入住  获取企业所有档案
    @GET("/api/enterprise-profiles")
    suspend fun getMerchantData():BaseRes<List<MerchantListEntityItem>>
    //商家入住详情
    @GET("/api/enterprise-profiles/{id}")
    suspend fun getMerchantDetailData(@Path("id") id:Int):BaseRes<DetailMerchantEntity>

    //申请记录
    @GET("/api/merchant-applications")
    suspend fun getRecordingData():BaseRes<List<RecordingEntityItem>>
    //创建商家入驻
    @POST("/api/merchant-applications")
    suspend fun getAddMerchantData(@Body addApplicationEntity:AddApplicationEntity):BaseRes<AddApplicationEntity>
    //商家入驻详情（审批详情）
    @GET("/api/merchant-applications/{id}")
    suspend fun getApprovalDetailData(@Path("id") id:Int):BaseRes<ApprovalDetailEntity>
}